<?php

namespace App\Http\Resources\Mini\WechatFansResource;

use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\ResourceCollection;

class PaymentOrderClass extends ResourceCollection
{

    /**
     * Transform the resource into an array.
     *
     * @param  Request  $request
     * @return array
     */
    public function toArray($request): array
    {
        return [
            'id' => $this->id,
            'user_id' => $this->user_id,//用户id
            'feeType' => $this->feeType,//费用类型
            'paymentMoney' => $this->paymentMoney,//支付金额
            'paymentTime' => $this->paymentTime,//支付时间
            'orderNo' => $this->orderNo,//订单号
            'pay_type' => $this->pay_type,//支付方式
            'pay_state' => $this->pay_state,//支付状态
            'pay_no' => $this->pay_no,//流水单号
            'pay_real' => $this->pay_real,//实际支付
            'fatherId' => $this->fatherId,//代理商id
            'months' => $this->months,//缴费月份
            'year' => $this->year,//年
            'month' => $this->month,//月
            'day' => $this->day,//日
            'is_split' => $this->is_split,//是否分账
            'split_money' => $this->split_money,//分账金额
            'is_auto' => $this->is_auto,//是否自动扣款
            'is_instead' => $this->is_instead,//1，自交；2，代缴
            'handlingFee' => $this->handlingFee,//手续费
            'after_split' => $this->after_split,//分账后金额
            'after_handling' => $this->after_handling,//去掉手续费金额
            'device_type' => $this->device_type,//设备类型：1，小程序；2，公众号
            'openid' => $this->openid,//openid
            'split_type' => $this->split_type,//分账模式
            'create_time' => $this->create_time,
            'update_time' => $this->update_time,
        ];
    }
}
